<template>
	<view class="car_details">
	<view class="car_top">
			
	
		<view class="car_img">
			<tm-images :src="baseurl+img" ></tm-images>
		</view>
		<view class="car_name">
			<view class="name">
				{{name}}
			</view> 
			<tm-tags color="bg-gradient-pink-accent" size="s" v-for="(item,index) in capture" :key="index">{{item}}</tm-tags>
		</view>
	</view>
		<view class="car_feature">
			<view class="name">
				车型配置
			</view>
			<view class="feature_content">
				<view class="fc_item" v-for="(i,index) in list" :key="index">
					<tm-icons :size="30" name="icon-filter-fill" color='#9E9E9E'></tm-icons><br/>
					 <text>{{i.name}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(ref) {
			this.img=ref.img
			this.name = ref.name
			this.arr = ref.arr
		},
		data() {
			return {
				img:'',
				name:'',
				arr:'',
				baseurl:'http://localhost:3050',
				list:[
					{name:'变速箱：自动'},
					{name:'进气：涡轮增压'},
					{name:'邮箱容量：40'},
					{name:'座位数：5'}
				]
			}
		},
		methods: {
			
		},
		computed:{
			capture(){
				return this.arr.split('、')
			}
		}
	}
</script>

<style lang="scss" scoped>
.car_details{
	.car_top{
		background-color: #ffffff;
		.car_img{
			width: 100%;
			// height: 500rpx;
		}
		.car_name{
			padding: 20rpx;
			.name{
				font-size: 32rpx;
				font-weight: 700;
			}
		}
	}

	.car_feature{
		padding: 20rpx;
		margin-top: 30rpx;
		background-color: #ffffff;
		.name{
			font-size: 32rpx;
			font-weight: 700;
		}
		.feature_content{
			display: flex;
			align-items: center;
			flex-wrap: wrap;
			.fc_item{
				line-height: 50rpx;
				height: 160rpx;
				color: #8c8c8c;
				font-size: 22rpx;
				width: 33%;
				text-align: center;
				text{
					line-height: 80rpx;
				}
			}
		}
	}
}
</style>
